package com.xc.stock.dto;

import java.util.Date;

import com.ag.utils.DateUtils;
import com.ag.utils.StringConvertJSONObjectSerializer;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.xc.stock.infrastructure.db.po.TradeAccPO;
import com.xc.stock.utils.fastjson.DateJsonSerializer;
import com.xc.stock.utils.jackjson.String2JsonObjSerializer;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

/**
 * TradeAccDTO 
 *
 * @author rplees 
 * @email rplees.i.ly@gmail.com 
 * @created 2022/08/12 
 */
@Data
@NoArgsConstructor
@SuperBuilder
@EqualsAndHashCode(
    callSuper = false
)
public class TradeAccDTO extends TradeAccPO {
	@JsonSerialize(using = DateJsonSerializer.class)
	@JSONField(format = DateUtils.YYYY_MM_DD_HH_MM_SS)
	@Override
	public Date getUpdateAt() {
		return super.getUpdateAt();
	}

	@JsonSerialize(using = DateJsonSerializer.class)
	@JSONField(format = DateUtils.YYYY_MM_DD_HH_MM_SS)
	@Override
	public Date getCreateAt() {
		return super.getCreateAt();
	}

	@JsonSerialize(using = String2JsonObjSerializer.class)
	@JSONField(serializeUsing = StringConvertJSONObjectSerializer.class)
	@Override
	public String getExt() {
		return super.getExt();
	}
}
